package com.doit.day02

import scala.beans.BeanProperty

case class ScalaOrder(@BeanProperty
                 var user_id: Int,
                 @BeanProperty
                 var order_id: Int,
                 @BeanProperty
                 var goods_id: Int,
                 @BeanProperty
                 var category_id: String,
                 @BeanProperty
                 var price: Double,
                 @BeanProperty
                 var goods_num: Int) extends Ordered[ScalaOrder]{
  override def compare(that: ScalaOrder): Int = that.goods_num - this.goods_num
}